package ar.com.angrymachine.hunter.gameplay;

import java.util.Vector;

import ar.com.angrymachine.hunter.Activity;
import ar.com.angrymachine.hunter.Game;
import ar.com.angrymachine.hunter.Locale;
import ar.com.angrymachine.hunter.HunterResourceManager;
import ar.com.angrymachine.hunter.activities.FightActivity;

public class HolySmitingSpell extends Spell
{
    public HolySmitingSpell()
    {
    	super(Locale.HOLY_SMITING_SPELL, HunterResourceManager.getImage("shield.png"), 2000, true, 0);
    }
    
    public void castOnCharacter(Character character)
    {
    	// do some damage
    	character.receiveAttack(250);
    }
    
    public void cast()
    {
        super.cast();
        // get all visible monsters
        Vector visibleActivities = Game.current.currentLevel.activities;
        for (int i = 0; i < visibleActivities.size(); i++)
		{
			Activity activity = (Activity) visibleActivities.elementAt(i);
			if(activity instanceof FightActivity)
			{
				// this is a monster
				FightActivity fa = (FightActivity) activity;
				fa.monster.receiveSpell(this);
			}
		}
    }
}
